﻿using System.ComponentModel;
using System.Runtime.CompilerServices;

namespace GuidGen.ViewModels
{
    public abstract class ViewModelBase : INotifyPropertyChanged
    {
        protected void NotifyPropertyChanged([CallerMemberName] string propertyName = null)
        {
            var deleg = PropertyChanged;
            if (deleg != null)
            {
                deleg(this, new PropertyChangedEventArgs(propertyName));
            }
        }

        public event PropertyChangedEventHandler PropertyChanged;
    }
}